<div class="wrap">
	<h2>
		Benutzer bearbeiten
	</h2>
{if $smarty.session.user_isadmin == "1"}
<div id='ajaxResponse' class="ajaxResponse"></div>
<form name="edituser" id="edituser" method="post" action="?module={$smarty.get.module}&sub1={$smarty.get.sub1}&id={$smarty.get.id}" onsubmit="onEditUser('edituser', 'ajaxResponse'); return false;">
	<input type="hidden" name="act" value="edituser" />
	<input type="hidden" name="user_id" value="{$smarty.get.id}" />
	
	<table class="editform" width="50%" align="center" cellpadding="5">
		<tr>
			<th width="33%" scope="row" valign="top">
			<label for="user_name">Benutzername</label></th>
			<td width="67%">
			<input name="user_name" id="user_name" type="text" readonly
			value="{$THEUSER->user_name}" size="40" maxlength="60"/>
			</td>
		</tr>
		<tr>
			<th width="33%" scope="row" valign="top">
			<label for="user_firstname">Vorname</label></th>
			<td width="67%">
			<input name="user_firstname" id="user_firstname" type="text" value="{$THEUSER->user_firstname}" size="40" maxlength="100"/></td>
		</tr>
		<tr>
			<th width="33%" scope="row" valign="top">
			<label for="user_lastname">Nachname</label></th>
			<td width="67%">
			<input name="user_lastname" id="user_lastname" type="text" value="{$THEUSER->user_lastname}" size="40" maxlength="100"/></td>
		</tr>
		<tr>
			<th width="33%" scope="row" valign="top">
			<label for="user_email">Email<br />(required)</label></th>
			<td width="67%">
			<input name="user_email" id="user_email" type="text" 
			value="{$THEUSER->user_email}" size="40" maxlength="100"/>
			</td>
		</tr>
		<tr>
			<th width="33%" scope="row" valign="middle">
			<label for="user_password">Passwort<br />(zweimal)</label></th>
			<td width="67%">
				<input name="user_password" id="user_password" type="password" value="{$THEUSER->user_password}" size="40" maxlength="64"/>
				<input name="user_password2" id="user_password2" type="password" value="{$THEUSER->user_password}" size="40" maxlength="64"/>
			</td>
		</tr>
		<tr>
			{if $smarty.session.user_id != $THEUSER->user_id}
			<th width="33%" scope="row" valign="middle">
			<label for="is_admin">Administrator</label></th>
			<td width="67%">
				{if $THEUSER->is_admin == "1"}
					<input checked="checked" name="is_admin" id="is_admin" type="checkbox" value="1"/>
				{else}
					<input name="is_admin" id="is_admin" type="checkbox" value="1"/>
				{/if}	
			</td>
			{/if}
		</tr>
		<tr>
			<td width="67%" colspan="2"  class="submit" align="right">
				<input type="image" name="submit" src="../view/admin/images/object_save.png" value="" />
			</td>
		</tr>
	</table>
</form>
{else}
Access denied
{/if}

</div>
